<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.3&services=false"></script>
<center><div id="container" style="width:760px;height:500px; padding:5px; border: 1px solid #CCCCCC;"></div></center>
<div id="mapinfo">
	<ul>
		<li style="height:25px;"><b>{{site.globalparam.200.companyname|default_if_none:''}}</b></li>
		<li style="height:20px;">地址：{{site.globalparam.200.companyaddress|default_if_none:''}}</li>
		<li style="height:20px;">电话：{{site.globalparam.200.companyphone|default_if_none:''}}</li>
		<li style="height:20px;">传真：{{site.globalparam.200.companyfax|default_if_none:''}}</li>
		<li style="height:20px;">联系人：{{site.globalparam.200.companylinkman|default_if_none:''}}</li> 
		<li style="height:20px;">手机：{{site.globalparam.200.companymobile|default_if_none:''}}</li> 
		<li style="height:20px;">email：{{site.globalparam.200.companyemail|default_if_none:''}}</li>
	</ul>
</div>
<script type="text/javascript">
var map = new BMap.Map("container");          // 创建地图实例
var point = new BMap.Point({{site.globalparam.200.coord|default:'116.404, 39.915'}});  // 创建点坐标
map.centerAndZoom(point, 15);                 // 初始化地图，设置中心点坐标和地图级别
var navOpts = {type: BMAP_NAVIGATION_CONTROL_ZOOM} 
map.addControl(new BMap.NavigationControl(navOpts));  
map.addControl(new BMap.ScaleControl());  
map.addControl(new BMap.OverviewMapControl());  
map.addControl(new BMap.MapTypeControl());  
var marker = new BMap.Marker(point);        // 创建标注  
map.addOverlay(marker); 
{% if site.power.user.power >= 100 %}
marker.addEventListener("click", function(){alert("移动何以获得经纬度数据！");}); 
marker.enableDragging();  
marker.addEventListener("dragend", function(e){ alert("当前位置：" + e.point.lng + ", " + e.point.lat); })  
{%endif%}
var sContent = $('#mapinfo').html();
var infoWindow = new BMap.InfoWindow(sContent);  // 创建信息窗口对象
marker.openInfoWindow(infoWindow);      // 打开信息窗口  
marker.addEventListener("click", function(){this.openInfoWindow(infoWindow);});
</script>